package com.itheima.health.dao;

import com.github.pagehelper.Page;
import com.itheima.health.pojo.User;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * Description: No Description
 * User: Eric
 */
public interface UserDao {
    /**
     * 根据登陆用户名称查询用户权限信息
     * @param username
     * @return
     */
    User findByUsername(String username);
    void addUser(User user);

    void addUserRole(@Param("roleId") Integer roleId, @Param("userId") Integer userId);

    List<Integer> findRoleIdsByUserId(int userId);

    Page<User> findByCondition(String queryString);

    User findById(int id);

    void deleteRoleUser(int id);

    void deleteUserById(int id);

    void updateUser(User user);

    List<User> findUser();

    User findWhitUsername(String username);


    User findMenusByUsername(String username);
}
